﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchSupplier.ascx.cs" Inherits="webUserControl_SearchSupplier" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<div class="code">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    
    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
    
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LinFen %>" 
        SelectCommand="SELECT [ID], [isType] FROM [sysType]"></asp:SqlDataSource>
    
<table style="width:100%; line-height:25px; font-size:12px;">
     <tr>
        <td style="text-align:left;">
            地区：<asp:DropDownList ID="DDLcityID" runat="server" AutoPostBack="True" 
                onselectedindexchanged="DDLcityID_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="DDLDistrictID" runat="server">
            </asp:DropDownList>
            分类：<asp:DropDownList ID="DDLcatalog" runat="server">
            </asp:DropDownList>
            档次：<asp:DropDownList ID="ddlDangCi" runat="server">
            </asp:DropDownList>
            媒体：<asp:DropDownList ID="ddlIsType" runat="server" 
                DataSourceID="SqlDataSource3" DataTextField="isType" DataValueField="ID">
            </asp:DropDownList>
            &nbsp;编号：<asp:TextBox ID="tbID" runat="server" Width="40px"></asp:TextBox>
            点位名称：<asp:TextBox ID="tbSuppliername" runat="server"></asp:TextBox> &nbsp;<asp:Button ID="btnSub" runat="server" Text="查询" onclick="btnSub_Click" />
         </td>
    </tr>
     <tr>
        <td style="text-align:left;">
           客户名称：<asp:Label 
                ID="lbCustomerName" runat="server" ></asp:Label>
            &nbsp;&nbsp;&nbsp; 电话：<asp:Label ID="lbTelPhone" runat="server"></asp:Label>
                &nbsp;&nbsp; 联络人：<asp:Label ID="lbLinkMan" runat="server"></asp:Label>
                &nbsp; 业务范围：<asp:Label ID="lbYewu" runat="server"></asp:Label>
        &nbsp;总需点位数：<asp:Label ID="lbAllPoints" runat="server" Font-Bold="True" 
                ForeColor="#CC3300"></asp:Label>
&nbsp;已分配点位数：<asp:Label ID="lbSumPoints" runat="server" Font-Bold="True" 
                ForeColor="#006600"></asp:Label>
&nbsp;截至日期：<asp:Label ID="lbEndDate" runat="server"></asp:Label>
            <br />
            点位 商家总数：<asp:Label ID="lbSupplierC" runat="server"></asp:Label>
&nbsp;男点位分布：<asp:Label ID="lbManS" runat="server" ></asp:Label>
&nbsp;女点位分布：<asp:Label ID="lbFeMaleS" runat="server" ></asp:Label>
&nbsp;烘干点位分布：<asp:Label ID="lbHongGanS" runat="server" ></asp:Label>
&nbsp;包间点位分布：<asp:Label ID="lbBaoJianS" runat="server" ></asp:Label>
&nbsp;其他点位分布：<asp:Label ID="lbQiTa" runat="server" ></asp:Label>
&nbsp;<asp:Panel ID="Panel2" runat="server" >
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LinFen %>" 
    
    
        
        SelectCommand="SELECT CityName AS 省份, DistrictName AS 城市,istype as 类型, ClassName AS 类别, DangCiName AS 档次, SupplierName AS 点位提供商, SupplierName2 AS 楼层, NumMale AS 男, NumFemale AS 女, NumHongGan AS 烘干机, NumBaoJian AS 包间, NumQiTa AS 其他, inTime AS 开始时间, endTime AS 结束时间, ID, SupplierID FROM vw_OrderDetail WHERE (CustomerID = @CustomerID) and status=0
order by id desc">
        <SelectParameters>
            <asp:QueryStringParameter Name="CustomerID" QueryStringField="cID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" 
        Caption="&lt;font color=black&gt;我的点位分布信息&lt;/font&gt;" CaptionAlign="Top" 
        CellPadding="4" DataSourceID="SqlDataSource2" Font-Size="12px" 
        Width="100%" onrowcommand="GridView2_RowCommand">
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <RowStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Center" />
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="编号" 
                SortExpression="SupplierID" />
            <asp:BoundField DataField="省份" HeaderText="省份" SortExpression="省份" />
            <asp:BoundField DataField="城市" HeaderText="城市" SortExpression="城市" />
            <asp:BoundField DataField="类型" HeaderText="类型" SortExpression="类型" />
            <asp:BoundField DataField="类别" HeaderText="类别" SortExpression="类别" />
            <asp:BoundField DataField="档次" HeaderText="档次" SortExpression="档次" />
            <asp:BoundField DataField="点位提供商" HeaderText="点位名称" SortExpression="点位提供商" />
            <asp:BoundField DataField="楼层" HeaderText="楼层" SortExpression="楼层" />
            <asp:BoundField DataField="男" HeaderText="男" SortExpression="男" />
            <asp:BoundField DataField="女" HeaderText="女" SortExpression="女" />
            <asp:BoundField DataField="烘干机" HeaderText="烘干机" SortExpression="烘干机" />
            <asp:BoundField DataField="包间" HeaderText="包间" SortExpression="包间" />
            <asp:BoundField DataField="其他" HeaderText="其他" SortExpression="其他" />
            <asp:BoundField DataField="开始时间" DataFormatString="{0:d}" HeaderText="开始时间" 
                SortExpression="开始时间" />
            <asp:BoundField DataField="结束时间" DataFormatString="{0:d}" HeaderText="结束时间" 
                SortExpression="结束时间" />
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:Button ID="Button1" runat="server" CausesValidation="False" 
                        CommandArgument='<%# Eval("id") %>' CommandName="shifang" Text="释放该点位" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" 
            HorizontalAlign="Center" />
    </asp:GridView>
</asp:Panel>
         </td>
    </tr>
     </table>
</div>

     <asp:Panel ID="Panel1" runat="server" Visible="False"><asp:GridView ID="GridView1" 
             runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="ID" 
        Font-Size="12px" ForeColor="#333333" GridLines="None" Width="100%" 
    onselectedindexchanged="GridView1_SelectedIndexChanged" AllowPaging="True" 
             onpageindexchanging="GridView1_PageIndexChanging" AllowSorting="True" 
             onsorting="GridView1_Sorting">
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" HorizontalAlign="Center" />
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" />
                 <asp:BoundField DataField="istype" HeaderText="类型" 
                SortExpression="istype" />
            <asp:BoundField DataField="ClassName" HeaderText="分类" 
                SortExpression="ClassName" />
            <asp:BoundField DataField="DangCiName" HeaderText="档次" 
                SortExpression="DangCiName" />
            <asp:BoundField DataField="DistrictName" HeaderText="地区" 
                SortExpression="DistrictName" />
            <asp:BoundField DataField="SupplierName" HeaderText="点位名称" 
                SortExpression="SupplierName" />
                <asp:BoundField DataField="SupplierName2" HeaderText="楼层" 
                SortExpression="SupplierName2" />
            <asp:BoundField DataField="NumUseDetails" HeaderText="点位情况(占/空/总)" 
                SortExpression="NumUseDetails" />
            <asp:BoundField DataField="NumMaleDetails" HeaderText="男位" SortExpression="NumMaleDetails" />
            <asp:BoundField DataField="NumFemaleDetails" HeaderText="女位" 
                SortExpression="NumFemaleDetails" />
            <asp:BoundField DataField="NumHongGanDetails" HeaderText="烘干位" 
                SortExpression="NumHongGanDetails" />
            <asp:BoundField DataField="NumBaoJianDetails" HeaderText="包间位" 
                SortExpression="NumBaoJianDetails" />
            <asp:BoundField DataField="NumQiTaDetails" HeaderText="其他(消防点位)" 
                SortExpression="NumQiTaDetails" />
            <asp:BoundField DataField="Bak" HeaderText="备注" SortExpression="Bak" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="~/PointsTimeUp.aspx?sID={0}" Target="_blank" HeaderText="分布情况"
             Text="分布情况"/>
            <asp:CommandField ShowSelectButton="True" />
            
        </Columns>
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
<div  class="code">
<center>男：<asp:DropDownList 
        ID="DDLMale" runat="server">
        <asp:ListItem>0</asp:ListItem>
    <asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    <asp:ListItem>4</asp:ListItem>
    <asp:ListItem>5</asp:ListItem>
    </asp:DropDownList>
    女：<asp:DropDownList ID="DDLFemale" runat="server">
    <asp:ListItem>0</asp:ListItem>
    <asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    <asp:ListItem>4</asp:ListItem>
    <asp:ListItem>5</asp:ListItem>
    </asp:DropDownList>
&nbsp;烘干：<asp:DropDownList ID="DDLHongGan" runat="server">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    <asp:ListItem>4</asp:ListItem>
    <asp:ListItem>5</asp:ListItem>
    </asp:DropDownList>
    包间：<asp:DropDownList ID="DDLBaoJian" runat="server">
    <asp:ListItem>0</asp:ListItem>
    <asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    <asp:ListItem>4</asp:ListItem>
    <asp:ListItem>5</asp:ListItem>
    </asp:DropDownList>
&nbsp;消防：<asp:DropDownList ID="DDLQiTa" runat="server">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    <asp:ListItem>4</asp:ListItem>
    <asp:ListItem>5</asp:ListItem>
    </asp:DropDownList>
    &nbsp;合同日期：<asp:Label ID="lblInDate" runat="server"></asp:Label>
    至<asp:Label ID="lbloutDate" runat="server"></asp:Label>
    <asp:Button ID="btnFenPei" runat="server" Text="分配点位" 
        onclick="btnFenPei_Click" />
        </center>
</div>
    </asp:Panel>



     

     